#!c:\Python27\python.exe -u
import cgi


annuaire = {"Standard"  : 6500,
            "Bidet"     : 6560,
            "Boimon"    : 6562,
            "Cottenceau": 6563,
            "Declerck"  : 6568,
            "Godon"     : 6570,
            "Hardouin"  : 6564,
            "Ferrier"   : 6574,
            "Lahaie"    : 6565} 


print """Content-type: text/html\n\n
<form method="post" action="form.py">
Nom : <input type = "text" name="nom">
<br/>
<input type="submit" value="Submit">
</form>"""

form = cgi.FieldStorage()
ch = ""
if form.getvalue('nom') is not None :
	nom = form.getvalue('nom').strip()
	
	if nom.upper() == "ALL":
		for i in annuaire.keys() :
			ch += i + " / "
	else:
		if nom in annuaire:
			ch = str(annuaire[nom])
		else:
			ch = "Error"
			
	print """<br/><br/>
	Result = %s"""%(ch)
